<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>预定管理</title>
    <link rel="stylesheet" href="../css/layui.css">
</head>
<body>
<header th:replace="common/header"></header>
<div class="layui-container">
    <div style="margin: 0 auto;margin-top: 5%;margin-left: 15%">

        <form action="/customer/searchByPhone" method="post">
            <div class="layui-row">
                联系电话:
                <input type="text" id="phone" name="phone" >
                <input type="submit" name="searchByPhone" value="Search" />
<!--                <button class="layui-btn layui-btn-radius" type="submit" name="searchBtn">输入用户电话进行查询</button>-->
            </div>
        </form>
        <div style="">
            <a href="/customer/addReserve">新建预定</a>
        </div>
        <span th:text="${msg}" style="color: red"></span>
        <div style="overflow-x: auto; overflow-y: auto; height: 400px; width:900px;">
            <table class="layui-table" lay-size="sm">
                <colgroup>
                    <col width="75">
                    <col width="75">
                    <col width="75">
                    <col width="75">
                    <col width="75">
                    <col width="75">
                    <col width="100">
                </colgroup>
                <thead>
                <tr>
                    <th>预定单号</th>
                    <th>客户姓名</th>
                    <th>联系方式</th>
                    <th>预定房间号</th>
                    <th>预定时间</th>
                    <th>押金</th>
                    <th>是否已取消(0代表未取消)</th>
                    <th>是否已入住（0代表未入住）</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <!--           条目-->
                <tr th:each="room_reserve:${room_reserveList}">
                    <td th:text="${room_reserve.reserver_id}">预定单号</td>
                    <td th:text="${room_reserve.customer_name}">客户姓名</td>
                    <td th:text="${room_reserve.customer_tel}">联系方式</td>
                    <td th:text="${room_reserve.reserve_room_id}">预定房间号</td>
                    <td th:text="${room_reserve.reserve_time}">预定房间号</td>
                    <td th:text="${room_reserve.reserve_deposit}">押金</td>
                    <td th:text="${room_reserve.cancle_bool}">0</td>
                    <td th:text="${room_reserve.check_in_bool}">0</td>
                    <td>
                        <a th:href="'/customer/changeReserve?reserver_id='+${room_reserve.reserver_id}" ><span style="color: #0000FF">修改订单</span></a>
                        <a th:href="'/customer/cancelReserve?reserver_id='+${room_reserve.reserver_id}"><span style="color: #0000FF">取消订单</span></a>
                        <a th:href="'/customer/reserveInRoom?reserver_id='+${room_reserve.reserver_id}"><span style="color: #0000FF">办理入住</span></a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<footer th:replace="common/bottom"></footer>
</body>
<script src="../js/layui.all.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
</script>